<!DOCTYPE html>
<html itemscope itemtype="http://schema.org/QAPage">

<head>

	<title>html parsing - How to convert a Jsoup Document to a W3C Document? - Stack Overflow</title>
	<link rel="shortcut icon" href="https://cdn.sstatic.net/Sites/stackoverflow/img/favicon.ico?v=4f32ecc8f43d">
	<link rel="apple-touch-icon image_src" href="https://cdn.sstatic.net/Sites/stackoverflow/img/apple-touch-icon.png?v=c78bd457575a">
	<link rel="search" type="application/opensearchdescription+xml" title="Stack Overflow" href="/opensearch.xml">
	<meta name="twitter:card" content="summary">
	<meta name="twitter:domain" content="stackoverflow.com"/>
	<meta property="og:type" content="website" />

	<meta property="og:image" itemprop="image primaryImageOfPage" content="https://cdn.sstatic.net/Sites/stackoverflow/img/apple-touch-icon@2.png?v=73d79a89bded" />
	<meta name="twitter:title" property="og:title" itemprop="title name" content="How to convert a Jsoup Document to a W3C Document?" />
	<meta name="twitter:description" property="og:description" itemprop="description" content="I have build a Jsoup Document by parsing a in-house HTML page,

public Document newDocument(String path) throws IOException {

    Document doc = null;
    doc = Jsoup.connect(path).timeout(0).get(..." />
	<meta property="og:url" content="http://stackoverflow.com/questions/17802445/how-to-convert-a-jsoup-document-to-a-w3c-document"/>
	<link rel="canonical" href="http://stackoverflow.com/questions/17802445/how-to-convert-a-jsoup-document-to-a-w3c-document" />



	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
	<script src="https://cdn.sstatic.net/Js/stub.en.js?v=dcb24092c13a"></script>
	<link rel="stylesheet" type="text/css" href="https://cdn.sstatic.net/Sites/stackoverflow/all.css?v=a658619ca39f">

	<link rel="alternate" type="application/atom+xml" title="Feed for question &#39;How to convert a Jsoup Document to a W3C Document?&#39;" href="/feeds/question/17802445">
	<meta name="twitter:app:country" content="US" />
	<meta name="twitter:app:name:iphone" content="Stack Exchange iOS" />
	<meta name="twitter:app:id:iphone" content="871299723" />
	<meta name="twitter:app:url:iphone" content="se-zaphod://stackoverflow.com/questions/17802445/how-to-convert-a-jsoup-document-to-a-w3c-document" />
	<meta name="twitter:app:name:ipad" content="Stack Exchange iOS" />
	<meta name="twitter:app:id:ipad" content="871299723" />
	<meta name="twitter:app:url:ipad" content="se-zaphod://stackoverflow.com/questions/17802445/how-to-convert-a-jsoup-document-to-a-w3c-document" />
	<meta name="twitter:app:name:googleplay" content="Stack Exchange Android">
	<meta name="twitter:app:url:googleplay" content="http://stackoverflow.com/questions/17802445/how-to-convert-a-jsoup-document-to-a-w3c-document">
	<meta name="twitter:app:id:googleplay" content="com.stackexchange.marvin">
	<script>

		StackExchange.ready(function () {

			StackExchange.using("snippets", function () {
				StackExchange.snippets.initSnippetRenderer();
			});


			StackExchange.using("postValidation", function () {
				StackExchange.postValidation.initOnBlurAndSubmit($('#post-form'), 2, 'answer');
			});


			StackExchange.question.init({showAnswerHelp:true,totalCommentCount:1,shownCommentCount:1,highlightColor:'#F4A83D',backgroundColor:'#FFF',questionId:17802445});

			styleCode();

			StackExchange.realtime.subscribeToQuestion('1', '17802445');
			StackExchange.using("gps", function () { StackExchange.gps.trackOutboundClicks('#content', '.post-text', true); });

		});
	</script>


	<script>
		StackExchange.init({"locale":"en","stackAuthUrl":"https://stackauth.com","networkMetaHostname":"meta.stackexchange.com","serverTime":1490932753,"routeName":"Questions/Show","site":{"name":"Stack Overflow","description":"Q&A for professional and enthusiast programmers","isNoticesTabEnabled":true,"recaptchaPublicKey":"6LdchgIAAAAAAJwGpIzRQSOFaO0pU6s44Xt8aTwc","recaptchaAudioLang":"en","enableNewTagCreationWarning":true,"insertSpaceAfterNameTabCompletion":false,"id":1,"enableInsertDocLinkDialog":true,"childUrl":"https://meta.stackoverflow.com","enableSocialMediaInSharePopup":true,"protocol":"http"},"user":{"fkey":"004ef4d7c5a52f46cb3a3d8a60a9a2e2","rep":0,"isAnonymous":true,"isAnonymousNetworkWide":true,"canSeeNewHeaderDesign":true,"ab":{"question_show_tweaks":{"v":"altern_unansw_cta","g":1},"simplified_signup_form":{"v":"messaging_b","g":1}}},"events":{"postType":{"question":1},"postEditionSection":{"title":1,"body":2,"tags":3}},"story":{"minCompleteBodyLength":75}}, {"site":{"allowImageUploads":true,"enableUserHovercards":true,"styleCode":true,"enableNewLinkInsertDialog":true,"enableImgurHttps":true,"forceHttpsImages":true},"comments":{},"userProfile":{"openGraphAPIKey":"58740831ad23540e00c58987"},"tags":{},"accounts":{"currentPasswordRequiredForChangingStackIdPassword":true},"flags":{"allowRetractingFlags":true},"snippets":{"snippetsEnabled":true,"renderDomain":"stacksnippets.net"},"markdown":{"asteriskIntraWordEmphasis":true},"monitoring":{"clientTimingsAbsoluteTimeout":30000,"clientTimingsDebounceTimeout":1000}});
		StackExchange.using.setCacheBreakers({"js/prettify-full.en.js":"2919c9c35ca8","js/moderator.en.js":"f4baa56cc463","js/full-anon.en.js":"7f5ab2e0b6de","js/full.en.js":"ba9b0119d5f7","js/wmd.en.js":"83b34a699ae8","js/third-party/jquery.autocomplete.min.js":"d3b8fa7fdf74","js/third-party/jquery.autocomplete.min.en.js":"","js/mobile.en.js":"b7cd8ce3d383","js/help.en.js":"54b998574be9","js/tageditor.en.js":"fae501f1255a","js/tageditornew.en.js":"eab9abbbf8e2","js/inline-tag-editing.en.js":"77dde44800e2","js/revisions.en.js":"8f22ba768cac","js/review.en.js":"01ed2ae46333","js/tagsuggestions.en.js":"78eee7c19ab2","js/post-validation.en.js":"164e6d28a39c","js/explore-qlist.en.js":"e71f14781288","js/events.en.js":"79c3744182c9","js/keyboard-shortcuts.en.js":"4fa5edb86a45","js/external-editor.en.js":"e574ed908cf3","js/adops.en.js":"9a6a7812a212","js/external-editor.en.js":"e574ed908cf3","js/snippet-javascript.en.js":"8949a8564319","js/snippet-javascript-codemirror.en.js":"958da44d43db"});
		StackExchange.using("gps", function() {
			StackExchange.gps.init(true);
		});
	</script>

	<script>
		StackExchange.ready(function () {
			$('#nav-tour').click(function () {
				StackExchange.using("gps", function() {
					StackExchange.gps.track("aboutpage.click", { aboutclick_location: "headermain" }, true);
				});
			});
		});
	</script>
	<noscript id="noscript-css"><style type="text/css">body,.so-header{margin-top:1.9em}</style></noscript>
</head>
<body class="question-page new-topbar">
<script>(function () { var old = $.fn.contents; $.fn.contents = function () { try { return old.apply(this, arguments); } catch (e) { return $([]); } } })()</script>
<iframe id="adzerk-user-match" width="0" height="0" frameborder="0" scrolling="no" onload="window.AUMIframeDone=true"
		src="https://ssum-sec.casalemedia.com/usermatch?s=183712&amp;cb=https%3A%2F%2Fengine.adzerk.net%2Fudb%2F22%2Fsync%2Fi.gif%3FpartnerId%3D1%26userId%3D"
		style="display: none;" marginheight="0" marginwidth="0"></iframe>

<div id="notify-container"></div>
<div id="custom-header"></div>


<header class="so-header js-so-header _fixed">
	<div class="-container">
		<div class="-main">
			<a href="http://stackoverflow.com" class="-logo ">
				<span class="-img">Stack Overflow</span>
			</a>

			<nav class="navigation" role="navigation" aria-label="site navigation">
				<ol class="-list">
					<li class="-item _current">
						<a id="nav-questions" href="/questions" class="-link js-gps-track"
						   data-gps-track="top_nav.click({is_current:true, location:2, destination:1})">Questions</a>
					</li>

					<li class="-item">
						<a id="nav-jobs" href="/jobs?med=site-ui&amp;ref=jobs-tab" class="-link js-gps-track"
						   data-gps-track="top_nav.click({is_current:false, location:2, destination:6})">Jobs</a>
					</li>
					<li class="-item">
						<a id="nav-docs" href="/documentation" class="-link js-gps-track"
						   data-gps-track="top_nav.click({is_current:false, location:2, destination:7})">Documentation <small class='beta-badge'>beta</small></a>
					</li>
					<li class="-item">
						<a id="nav-tags" href="/tags" class="-link js-gps-track"
						   data-gps-track="top_nav.click({is_current:false, location:2, destination:2})">Tags</a>
					</li>

					<li class="-item">
						<a id="nav-users" href="/users" class="-link js-gps-track"
						   data-gps-track="top_nav.click({is_current:false, location:2, destination:3})">Users</a>
					</li>

				</ol>
			</nav>

			<form id="search" action="/search" method="get" class="searchbar" autocomplete="off" role="search">
				<svg viewBox="0 0 18 18" width="18" height="18" role="icon"><path fill-rule="evenodd" d="M12.864 11.32h-.813l-.288-.277A6.66 6.66 0 0 0 13.38 6.69a6.69 6.69 0 1 0-6.69 6.69 6.66 6.66 0 0 0 4.354-1.617l.278.288v.813L16.467 18 18 16.467l-5.136-5.146zm-6.174 0a4.625 4.625 0 0 1-4.632-4.63A4.625 4.625 0 0 1 6.69 2.058a4.625 4.625 0 0 1 4.63 4.632 4.625 4.625 0 0 1-4.63 4.63z"/></svg>
				<input name="q" type="text" placeholder="Search..." value="" tabindex="1" autocomplete="off" maxlength="240" class="f-input js-search-field" />
				<button type="submit" class="btn js-search-submit">
					<svg viewBox="0 0 18 18" width="18" height="18" role="icon"><path fill-rule="evenodd" d="M12.864 11.32h-.813l-.288-.277A6.66 6.66 0 0 0 13.38 6.69a6.69 6.69 0 1 0-6.69 6.69 6.66 6.66 0 0 0 4.354-1.617l.278.288v.813L16.467 18 18 16.467l-5.136-5.146zm-6.174 0a4.625 4.625 0 0 1-4.632-4.63A4.625 4.625 0 0 1 6.69 2.058a4.625 4.625 0 0 1 4.63 4.632 4.625 4.625 0 0 1-4.63 4.63z"/></svg>
				</button>
			</form>

		</div>



		<div class="-actions">
			<nav class="secondary-nav">
				<div class="-dialog-container js-topbar-dialog-corral">


					<div class="topbar-dialog siteSwitcher-dialog dno">
						<div class="header">
							<h3><a href="http://stackoverflow.com">current community</a>
							</h3>
						</div>
						<div class="modal-content current-site-container">
							<ul class="current-site">
								<li>
									<div class="related-links">
										<a href="http://stackoverflow.com/help" class="js-gps-track"     data-gps-track="site_switcher.click({ item_type:14 })"
										>help</a>
										<a href="http://chat.stackoverflow.com" class="js-gps-track"     data-gps-track="site_switcher.click({ item_type:6 })"
										>chat</a>
									</div>

									<a href="http://stackoverflow.com"
									   class="current-site-link site-link js-gps-track"
									   data-id="1"
									   data-gps-track="site_switcher.click({ item_type:3 })">
										<div class="site-icon favicon favicon-stackoverflow" title="Stack Overflow"></div>
										Stack Overflow
									</a>

								</li>
								<li class="related-site">
									<div class="L-shaped-icon-container">
										<span class="L-shaped-icon"></span>
									</div>


									<a href="https://meta.stackoverflow.com"
									   class="site-link js-gps-track"
									   data-id="552"
									   data-gps-track="site.switch({ target_site:552, item_type:3 }),site_switcher.click({ item_type:4 })">
										<div class="site-icon favicon favicon-stackoverflowmeta" title="Meta Stack Overflow"></div>
										Meta Stack Overflow
									</a>

								</li>
							</ul>
						</div>

						<div class="header" id="your-communities-header">
							<h3>
								your communities            </h3>

						</div>
						<div class="modal-content" id="your-communities-section">

							<div class="call-to-login">
								<a href="https://stackoverflow.com/users/signup?ssrc=site_switcher&amp;returnurl=%2fusers%2fstory%2fcurrent&amp;amp;utm_source=stackoverflow.com&amp;amp;utm_medium=dev-story&amp;amp;utm_campaign=signup-redirect" class="login-link js-gps-track"     data-gps-track="site_switcher.click({ item_type:10 })"
								>Sign up</a> or <a href="https://stackoverflow.com/users/login?ssrc=site_switcher&amp;returnurl=http%3a%2f%2fstackoverflow.com%2fquestions%2f17802445%2fhow-to-convert-a-jsoup-document-to-a-w3c-document" class="login-link js-gps-track"     data-gps-track="site_switcher.click({ item_type:11 })"
							>log in</a> to customize your list.
							</div>
						</div>

						<div class="header">
							<h3><a href="https://stackexchange.com/sites">more stack exchange communities</a>
							</h3>
							<a href="https://stackoverflow.blog" class="fr">company blog</a>
						</div>
						<div class="modal-content">
							<div class="child-content"></div>
						</div>
					</div>
					<div class="topbar-dialog help-dialog js-help-dialog dno">
						<div class="modal-content">
							<ul>
								<li>
									<a href="/tour" class="js-gps-track" data-gps-track="help_popup.click({ item_type:1 })">
										Tour
                            <span class="item-summary">
                                Start here for a quick overview of the site
                            </span>
									</a>
								</li>
								<li>
									<a href="/help" class="js-gps-track" data-gps-track="help_popup.click({ item_type:4 })">
										Help Center
                        <span class="item-summary">
                            Detailed answers to any questions you might have
                        </span>
									</a>
								</li>
								<li>
									<a href="https://meta.stackoverflow.com" class="js-gps-track" data-gps-track="help_popup.click({ item_type:2 })">
										Meta
                                <span class="item-summary">
                                    Discuss the workings and policies of this site
                                </span>
									</a>
								</li>
								<li>
									<a href="http://stackoverflow.com/company/about" class="js-gps-track" data-gps-track="help_popup.click({ item_type:6 })">
										About Us
                                <span class="item-summary">
                                    Learn more about Stack Overflow the company
                                </span>
									</a>
								</li>
								<li>
									<a href="https://www.stackoverflowbusiness.com/?ref=topbar_help" class="js-gps-track" data-gps-track="help_popup.click({ item_type:7 })">
										Business
                                <span class="item-summary">
                                    Learn more about hiring developers or posting ads with us
                                </span>
									</a>
								</li>
							</ul>
						</div>
					</div>

				</div>
				<ol class="-list">

					<li class="-item"><a href="#" class="-link js-help-button" title="Help Center and other resources">
						<svg viewBox="0 0 18 18" width="18" height="18" role="icon"><path fill-rule="evenodd" d="M9 0a9 9 0 1 0 .001 18.001A9 9 0 0 0 9 0zm.812 13.126c-.02.716-.55 1.157-1.238 1.137-.659-.02-1.177-.49-1.157-1.209.02-.715.566-1.17 1.225-1.15.691.021 1.194.507 1.17 1.222zm1.956-5.114c-.168.237-.546.542-1.02.912l-.527.361c-.257.197-.417.43-.502.695-.044.141-.076.507-.084.752-.004.048-.032.156-.181.156H7.883c-.165 0-.185-.096-.18-.144.023-.667.12-1.218.397-1.66.374-.594 1.426-1.221 1.426-1.221.161-.12.286-.25.382-.39.177-.24.321-.51.321-.8 0-.333-.08-.65-.293-.915-.249-.31-.518-.458-1.036-.458-.51 0-.808.257-1.021.594-.213.338-.177.735-.177 1.097H5.746c0-1.366.357-2.238 1.112-2.752.51-.35 1.162-.502 1.921-.502.996 0 1.788.184 2.487.715.647.49.988 1.181.988 2.113 0 .575-.2 1.057-.486 1.447z" /></svg>
					</a></li>
					<li class="-item">
						<a href="https://stackexchange.com" class="-link js-site-switcher-button js-gps-track" data-gps-track="site_switcher.show" title="A list of all 167 Stack Exchange sites">
							<svg viewBox="0 0 18 19" width="18" height="19" role="icon"><path fill-rule="evenodd" d="M0 14a2 2 0 0 0 2 2h10v3l3-3h1a2 2 0 0 0 2-2v-2H0v2zM16 0H2a2 2 0 0 0-2 2v2h18V2a2 2 0 0 0-2-2zM0 6h18v4H0V6z" /></svg>
						</a>
					</li>


				</ol>
			</nav>
			<div class="-ctas">
				<a href="https://stackoverflow.com/users/login?ssrc=head&returnurl=http%3a%2f%2fstackoverflow.com%2fquestions%2f17802445%2fhow-to-convert-a-jsoup-document-to-a-w3c-document" class="login-link btn-clear" rel="nofollow">Log In</a>
				<a href="https://stackoverflow.com/users/signup?ssrc=head&returnurl=%2fusers%2fstory%2fcurrent&amp;utm_source=stackoverflow.com&amp;utm_medium=dev-story&amp;utm_campaign=signup-redirect" class="login-link btn" rel="nofollow">Sign Up</a>

			</div>
		</div>
	</div>
</header>

<script>
	StackExchange.ready(function () { StackExchange.topbar.init(); });
	StackExchange.scrollPadding.setPaddingTop(60, 10);     </script>

<div class="container">



	<div id="content" class="snippet-hidden">





		<div itemscope itemtype="http://schema.org/Question">
			<link itemprop="image" href="https://cdn.sstatic.net/Sites/stackoverflow/img/apple-touch-icon.png?v=c78bd457575a">


			<div id="herobox" class="alternate">
				<div class="test"></div>
				<div id="close">
					<a title="click to minimize"><span>x</span> Dismiss</a>
				</div>
				<div class="content">
					<b>Join the Stack Overflow Community</b>
					<div class="separator"></div>
					<div class="blurb">
						Stack Overflow is a community of 6.9 million programmers, just like you, helping each other.
						<br/>
						Join them; it only takes a minute:                    <br/>
					</div>
					<a href="/users/signup?ssrc=hero&amp;returnurl=%2fusers%2fstory%2fcurrent&amp;amp;utm_source=stackoverflow.com&amp;amp;utm_medium=dev-story&amp;amp;utm_campaign=signup-redirect" id="tell-me-more" class="button">Sign up</a>
				</div>
			</div>
			<script>
				StackExchange.ready(function () {

					var location = 0;
					if ($("body").hasClass("questions-page")) {
						location = 1;
					} else if ($("body").hasClass("question-page")) {
						location = 1;
					} else if ($("body").hasClass("faq-page")) {
						location = 5;
					} else if ($("body").hasClass("home-page")) {
						location = 3;
					}


					$('#tell-me-more').click(function () {
						StackExchange.using("gps", function () {
							StackExchange.gps.track("hero.action", { hero_action_type: 'cta', location: location }, true);
						});
					});

					$('#herobox #close').click(function () {

						StackExchange.using("gps", function () {
							StackExchange.gps.track("hero.action", { hero_action_type: "minimize", location: location }, true);
						});

						$.cookie("hero", "mini", { path: "/", expires: 365 });
						$.ajax({
							url: "/hero-mini",
							success: function (data) {
								$("#herobox").fadeOut("fast", function () {
									$("#herobox").replaceWith(data);
									$("#herobox-mini").fadeIn("fast");
								});
							}
						});
						return false;
					});
				});

			</script>			<div id="question-header">
			<h1 itemprop="name"><a href="/questions/17802445/how-to-convert-a-jsoup-document-to-a-w3c-document" class="question-hyperlink">How to convert a Jsoup Document to a W3C Document?</a></h1>


			<div class="aside-cta" role="navigation" aria-label="ask new question">
				<a href="/questions/ask" class="btn-outlined">Ask Question</a>
			</div>
		</div>
			<div id="mainbar" role="main" aria-label="question and answers">



				<div class="question" data-questionid="17802445"  id="question">

					<script>
						var ados = ados || {}; ados.run = ados.run || [];
						ados.run.push(function () { ados_add_placement(22,8277,"adzerk1933846716",4).setZone(43); });
					</script>
					<div class="everyonelovesstackoverflow" id="adzerk1933846716"></div>    <table>
					<tr>
						<td class="votecell">


							<div class="vote">
								<input type="hidden" name="_id_" value="17802445">
								<a class="vote-up-off" title="This question shows research effort; it is useful and clear">up vote</a>
								<span itemprop="upvoteCount" class="vote-count-post ">5</span>
								<a class="vote-down-off" title="This question does not show any research effort; it is unclear or not useful">down vote</a>

								<a class="star-off" href="#">favorite</a>
								<div class="favoritecount"><b>2</b></div>


							</div>

						</td>

						<td class="postcell">
							<div>
								<div class="post-text" itemprop="text">

									<p>I have build a Jsoup Document by parsing a in-house HTML page,</p>

<pre><code>public Document newDocument(String path) throws IOException {

    Document doc = null;
    doc = Jsoup.connect(path).timeout(0).get();
            return new HtmlDocument&lt;Document&gt;(doc);
}
</code></pre>

									<p>I would want to convert the Jsoup document to my <code>org.w3c.dom.Document</code>
										I used an available library <a href="http://svn.apache.org/repos/asf/stanbol/trunk/enhancement-engines/htmlextractor/src/main/java/org/apache/stanbol/enhancer/engines/htmlextractor/impl/DOMBuilder.java" rel="nofollow">DOMBuilder</a> for this but when parsing I get <code>org.w3c.dom.Document</code> as null. I am unable to understand the problem, tried searching but couldnt find any answer.</p>

									<p>Code to generate the W3C DOM Document : </p>

<pre><code>Document jsoupDoc=factory.newDocument("http:localhost/testcases/test_2.html"));
org.w3c.dom.Document docu= DOMBuilder.jsoup2DOM(jsoupDoc);
</code></pre>

									<p>Can anyone please help me on this?</p>
								</div>
								<div class="post-taglist">
									<a href="/questions/tagged/html-parsing" class="post-tag" title="show questions tagged &#39;html-parsing&#39;" rel="tag">html-parsing</a> <a href="/questions/tagged/jsoup" class="post-tag" title="show questions tagged &#39;jsoup&#39;" rel="tag">jsoup</a> <a href="/questions/tagged/apache-stanbol" class="post-tag" title="show questions tagged &#39;apache-stanbol&#39;" rel="tag">apache-stanbol</a>
								</div>
								<table class="fw">
									<tr>
										<td class="vt">
											<div class="post-menu"><a href="/q/17802445" title="short permalink to this question" class="short-link" id="link-post-17802445">share</a><span class="lsep">|</span><a href="/posts/17802445/edit" class="suggest-edit-post" title="">improve this question</a></div>
										</td>
										<td align="right" class="post-signature">
											<div class="user-info user-hover">
												<div class="user-action-time">
													<a href="/posts/17802445/revisions" title="show all edits to this post">edited <span title="2015-05-15 11:29:19Z" class="relativetime">May 15 '15 at 11:29</span></a>
												</div>
												<div class="user-gravatar32">
													<a href="/users/363573/stephan"><div class="gravatar-wrapper-32"><img src="https://www.gravatar.com/avatar/e14a13f1a3b0f11a39496f47c0606cf9?s=32&amp;d=identicon&amp;r=PG&amp;f=1" alt="" width="32" height="32"></div></a>
												</div>
												<div class="user-details">
													<a href="/users/363573/stephan">Stephan</a>
													<div class="-flair">
														<span class="reputation-score" title="reputation score 22,197" dir="ltr">22.2k</span><span title="27 gold badges"><span class="badge1"></span><span class="badgecount">27</span></span><span title="115 silver badges"><span class="badge2"></span><span class="badgecount">115</span></span><span title="179 bronze badges"><span class="badge3"></span><span class="badgecount">179</span></span>
													</div>
												</div>
											</div>    </td>
										<td class="post-signature owner">
											<div class="user-info ">
												<div class="user-action-time">
													asked <span title="2013-07-23 05:57:38Z" class="relativetime">Jul 23 '13 at 5:57</span>
												</div>
												<div class="user-gravatar32">
													<a href="/users/902396/sudharma-puranik"><div class="gravatar-wrapper-32"><img src="https://i.stack.imgur.com/jsdZp.jpg?s=32&amp;g=1" alt="" width="32" height="32"></div></a>
												</div>
												<div class="user-details">
													<a href="/users/902396/sudharma-puranik">sudharma.puranik</a>
													<div class="-flair">
														<span class="reputation-score" title="reputation score " dir="ltr">674</span><span title="2 gold badges"><span class="badge1"></span><span class="badgecount">2</span></span><span title="12 silver badges"><span class="badge2"></span><span class="badgecount">12</span></span><span title="29 bronze badges"><span class="badge3"></span><span class="badgecount">29</span></span>
													</div>
												</div>
											</div>
										</td>
									</tr>
								</table>
							</div>
						</td>
					</tr>

					<tr>
						<td class="votecell"></td>
						<td>
							<div id="comments-17802445" class="comments ">
								<table>
									<tbody data-remaining-comments-count="0"
										   data-canpost="false"
										   data-cansee="true"
										   data-comments-unavailable="false"
										   data-addlink-disabled="true">



									<tr id="comment-26611337" class="comment ">
										<td>
											<table>
												<tbody>
												<tr>
													<td class=" comment-score">
														&nbsp;&nbsp;
													</td>
													<td>
														&nbsp;
													</td>
												</tr>
												</tbody>
											</table>
										</td>
										<td class="comment-text">
											<div style="display: block;" class="comment-body">
												<span class="comment-copy"><a href="http://svn.apache.org/repos/asf/stanbol/trunk/enhancement-engines/htmlextractor/src/main/java/org/apache/stanbol/enhancer/engines/htmlextractor/impl/DOMBuilder.java" rel="nofollow noreferrer">svn.apache.org/repos/asf/stanbol/trunk/enhancement-engines/&hellip;</a></span>
												&ndash;&nbsp;<a href="/users/59087/dave-jarvis"
																title="17,555 reputation"
																class="comment-user">Dave Jarvis</a>
												<span class="comment-date" dir="ltr"><span title="2013-08-10 18:39:15Z" class="relativetime-clean">Aug 10 '13 at 18:39</span></span>
											</div>
										</td>
									</tr>
									</tbody>
								</table>
							</div>

							<div id="comments-link-17802445" data-rep=50 data-anon=true>

								<a class="js-add-link comments-link disabled-link "
								   title="Use comments to ask for more information or suggest improvements. Avoid answering questions in comments."
								>add a comment</a><span class="js-link-separator dno">&nbsp;|&nbsp;</span>
								<a class="js-show-link comments-link dno" title="expand to show all comments on this post" href=# onclick=""></a>
							</div>
						</td>
					</tr>        </table>
				</div>

				<div id="answers">

					<a name="tab-top"></a>
					<div id="answers-header">
						<div class="subheader answers-subheader">
							<h2>
								2 Answers
								<span style="display:none;" itemprop="answerCount">2</span>
							</h2>
							<div>
								<div id="tabs">
									<a href="/questions/17802445/how-to-convert-a-jsoup-document-to-a-w3c-document?answertab=active#tab-top" data-nav-xhref="" title="Answers with the latest activity first" data-value="active" data-shortcut="A">
										active</a>
									<a href="/questions/17802445/how-to-convert-a-jsoup-document-to-a-w3c-document?answertab=oldest#tab-top" data-nav-xhref="" title="Answers in the order they were provided" data-value="oldest" data-shortcut="O">
										oldest</a>
									<a class="youarehere" href="/questions/17802445/how-to-convert-a-jsoup-document-to-a-w3c-document?answertab=votes#tab-top" data-nav-xhref="" title="Answers with the highest score first" data-value="votes" data-shortcut="V">
										votes</a>
								</div>
							</div>
						</div>
					</div>





					<a name="19014280"></a>
					<div id="answer-19014280" class="answer accepted-answer" data-answerid="19014280"  itemscope itemtype="http://schema.org/Answer" itemprop="acceptedAnswer">
						<table>
							<tr>
								<td class="votecell">


									<div class="vote">
										<input type="hidden" name="_id_" value="19014280">
										<a class="vote-up-off" title="This answer is useful">up vote</a>
										<span itemprop="upvoteCount" class="vote-count-post ">5</span>
										<a class="vote-down-off" title="This answer is not useful">down vote</a>



										<span class="vote-accepted-on load-accepted-answer-date" title="loading when this answer was accepted...">accepted</span>

									</div>

								</td>



								<td class="answercell">
									<div class="post-text" itemprop="text">
										<p><a href="http://jsoup.org/cookbook/input/load-document-from-url">To retrieve a jsoup document via HTTP</a>, make a call to <code>Jsoup.connect(...).get()</code>.  <a href="http://jsoup.org/cookbook/input/load-document-from-file">To load a jsoup document locally</a>, make a call to <code>Jsoup.parse(new File("..."), "UTF-8")</code>.</p>

										<p>The call to <code>DomBuilder</code> is correct.</p>

										<p>When you say, </p>

										<blockquote>
											<p>I used an available library DOMBuilder for this but when parsing I
												get org.w3c.dom.Document as null.</p>
										</blockquote>

										<p>I think you mean, "I used an available library, DOMBuilder, for this but when printing the result, I get <code>[#document: null]</code>."  At least, that was the result I saw when I tried printing the <code>w3cDoc</code> object - but that doesn't mean the object is null.  I was able to traverse the document by making calls to <code>getDocumentElement</code> and <code>getChildNodes</code>.</p>

<pre><code>public static void main(String[] args) {
    Document jsoupDoc = null;

    try {
        jsoupDoc = Jsoup.connect("http://stackoverflow.com/questions/17802445").get();
    } catch (IOException e) {
        e.printStackTrace();
    }

    org.w3c.dom.Document w3cDoc= DOMBuilder.jsoup2DOM(jsoupDoc);
    Element e = w3cDoc.getDocumentElement();
    NodeList childNodes = e.getChildNodes();
    Node n = childNodes.item(2);
    System.out.println(n.getNodeName());
}
</code></pre>
									</div>
									<table class="fw">
										<tr>
											<td class="vt">
												<div class="post-menu"><a href="/a/19014280" title="short permalink to this answer" class="short-link" id="link-post-19014280">share</a><span class="lsep">|</span><a href="/posts/19014280/edit" class="suggest-edit-post" title="">improve this answer</a></div>                    </td>



											<td align="right" class="post-signature">


												<div class="user-info ">
													<div class="user-action-time">
														answered <span title="2013-09-25 20:08:10Z" class="relativetime">Sep 25 '13 at 20:08</span>
													</div>
													<div class="user-gravatar32">
														<a href="/users/1715565/richard-krajunus"><div class="gravatar-wrapper-32"><img src="https://i.stack.imgur.com/CFrKX.png?s=32&amp;g=1" alt="" width="32" height="32"></div></a>
													</div>
													<div class="user-details">
														<a href="/users/1715565/richard-krajunus">Richard Krajunus</a>
														<div class="-flair">
															<span class="reputation-score" title="reputation score " dir="ltr">769</span><span title="7 silver badges"><span class="badge2"></span><span class="badgecount">7</span></span><span title="16 bronze badges"><span class="badge3"></span><span class="badgecount">16</span></span>
														</div>
													</div>
												</div>
											</td>
										</tr>
									</table>
								</td>
							</tr>

							<tr>
								<td class="votecell"></td>
								<td>
									<div id="comments-19014280" class="comments  dno">
										<table>
											<tbody data-remaining-comments-count="0"
												   data-canpost="false"
												   data-cansee="true"
												   data-comments-unavailable="false"
												   data-addlink-disabled="true">

											<tr><td></td><td></td></tr>
											</tbody>
										</table>
									</div>

									<div id="comments-link-19014280" data-rep=50 data-anon=true>

										<a class="js-add-link comments-link disabled-link "
										   title="Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”."
										>add a comment</a><span class="js-link-separator dno">&nbsp;|&nbsp;</span>
										<a class="js-show-link comments-link dno" title="expand to show all comments on this post" href=# onclick=""></a>
									</div>
								</td>
							</tr>    </table>
					</div>
					<script>
						var ados = ados || {}; ados.run = ados.run || [];
						ados.run.push(function () { ados_add_placement(22,8277,"adzerk636269002",4).setZone(44); });
					</script>
					<div class="everyonelovesstackoverflow" id="adzerk636269002"></div>

					<a name="30258688"></a>
					<div id="answer-30258688" class="answer" data-answerid="30258688"  itemscope itemtype="http://schema.org/Answer">
						<table>
							<tr>
								<td class="votecell">


									<div class="vote">
										<input type="hidden" name="_id_" value="30258688">
										<a class="vote-up-off" title="This answer is useful">up vote</a>
										<span itemprop="upvoteCount" class="vote-count-post ">11</span>
										<a class="vote-down-off" title="This answer is not useful">down vote</a>




									</div>

								</td>



								<td class="answercell">
									<div class="post-text" itemprop="text">
										<p>Alternatively, Jsoup provides the experimental (as of this writing) W3CDom class with the method <a href="http://jsoup.org/apidocs/org/jsoup/helper/W3CDom.html#fromJsoup(org.jsoup.nodes.Document)" rel="nofollow noreferrer"><code>fromJsoup</code></a>. This method transforms a Jsoup Document into a W3C document.</p>

<pre><code>Document jsoupDoc = ...
W3CDom w3cDom = new W3CDom();
org.w3c.dom.Document w3cDoc = w3cDom.fromJsoup(jsoupDoc);
</code></pre>

										<p><strong>UPDATE:</strong></p>

										<ul>
											<li><strong>Up to Jsoup 1.10.2</strong> W3CDom class is still experimental.</li>
										</ul>
									</div>
									<table class="fw">
										<tr>
											<td class="vt">
												<div class="post-menu"><a href="/a/30258688" title="short permalink to this answer" class="short-link" id="link-post-30258688">share</a><span class="lsep">|</span><a href="/posts/30258688/edit" class="suggest-edit-post" title="">improve this answer</a></div>                    </td>
											<td align="right" class="post-signature">
												<div class="user-info ">
													<div class="user-action-time">
														<a href="/posts/30258688/revisions" title="show all edits to this post">edited <span title="2017-02-15 22:07:23Z" class="relativetime">Feb 15 at 22:07</span></a>
													</div>
													<div class="user-gravatar32">

													</div>
													<div class="user-details">

														<div class="-flair">

														</div>
													</div>
												</div>    </td>



											<td align="right" class="post-signature">


												<div class="user-info user-hover">
													<div class="user-action-time">
														answered <span title="2015-05-15 11:44:03Z" class="relativetime">May 15 '15 at 11:44</span>
													</div>
													<div class="user-gravatar32">
														<a href="/users/363573/stephan"><div class="gravatar-wrapper-32"><img src="https://www.gravatar.com/avatar/e14a13f1a3b0f11a39496f47c0606cf9?s=32&amp;d=identicon&amp;r=PG&amp;f=1" alt="" width="32" height="32"></div></a>
													</div>
													<div class="user-details">
														<a href="/users/363573/stephan">Stephan</a>
														<div class="-flair">
															<span class="reputation-score" title="reputation score 22,197" dir="ltr">22.2k</span><span title="27 gold badges"><span class="badge1"></span><span class="badgecount">27</span></span><span title="115 silver badges"><span class="badge2"></span><span class="badgecount">115</span></span><span title="179 bronze badges"><span class="badge3"></span><span class="badgecount">179</span></span>
														</div>
													</div>
												</div>
											</td>
										</tr>
									</table>
								</td>
							</tr>

							<tr>
								<td class="votecell"></td>
								<td>
									<div id="comments-30258688" class="comments  dno">
										<table>
											<tbody data-remaining-comments-count="0"
												   data-canpost="false"
												   data-cansee="true"
												   data-comments-unavailable="false"
												   data-addlink-disabled="true">

											<tr><td></td><td></td></tr>
											</tbody>
										</table>
									</div>

									<div id="comments-link-30258688" data-rep=50 data-anon=true>

										<a class="js-add-link comments-link disabled-link "
										   title="Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”."
										>add a comment</a><span class="js-link-separator dno">&nbsp;|&nbsp;</span>
										<a class="js-show-link comments-link dno" title="expand to show all comments on this post" href=# onclick=""></a>
									</div>
								</td>
							</tr>    </table>
					</div>
					<a name='new-answer'></a>
					<form id="post-form" action="/questions/17802445/answer/submit" method="post"  class="post-form">
						<input type="hidden" id="post-id" value="17802445" />
						<input type="hidden" id="qualityBanWarningShown" name="qualityBanWarningShown" value="false" />
						<input type="hidden" name="referrer" value="http://global.bing.com/search?q=java+convert+jsoup+document+to+w3c+document&amp;qs=n&amp;form=QBRE&amp;sp=-1&amp;pq=java+convert+jsoup+do&amp;sc=0-21&amp;sk=&amp;cvid=88EB7DED200F422EB4013E76341804BB"/>
						<h2 class="space">Your Answer</h2>


						<script>
							StackExchange.ifUsing("editor", function () {
								StackExchange.using("externalEditor", function () {
									StackExchange.using("snippets", function () {
										StackExchange.snippets.init();
									});
								});
							}, "code-snippets");
						</script>


						<script>
							StackExchange.ready(function() {
								initTagRenderer("".split(" "), "".split(" "));

								StackExchange.using("externalEditor", function() {
									// Have to fire editor after snippets, if snippets enabled
									if (StackExchange.settings.snippets.snippetsEnabled) {
										StackExchange.using("snippets", function() {
											createEditor();
										});
									}
									else {
										createEditor();
									}
								});

								function createEditor() {
									StackExchange.prepareEditor({
										heartbeatType: 'answer',
										convertImagesToLinks: true,
										reputationToPostImages: 10,
										bindNavPrevention: true,
										postfix: "",
										onDemand: true,
										discardSelector: ".discard-answer"
										,immediatelyShowMarkdownHelp:true
									});


								}
							});
						</script>


						<div id="post-editor" class="post-editor js-post-editor">

							<div style="position: relative;">
								<div class="wmd-container">
									<div id="wmd-button-bar" class="wmd-button-bar"></div>
									<textarea id="wmd-input" class="wmd-input" name="post-text" cols="92" rows="15" tabindex="101" data-min-length=""></textarea>
								</div>
							</div>

							<div class="fl" style="margin-top: 8px; height:24px;">&nbsp;</div>
							<div id="draft-saved" class="draft-saved community-option fl" style="margin-top: 8px; height:24px; display:none;">draft saved</div>

							<div id="draft-discarded" class="draft-discarded community-option fl" style="margin-top: 8px; height:24px; display:none;">draft discarded</div>



							<div id="wmd-preview" class="wmd-preview"></div>
							<div></div>
							<div class="edit-block">
								<input id="fkey" name="fkey" type="hidden" value="004ef4d7c5a52f46cb3a3d8a60a9a2e2">
								<input id="author" name="author" type="text">
							</div>



						</div>
						<div style="position: relative;">

							<div class="form-item dno new-post-login">

								<div class="new-login-form">
									<div class="new-login-left">
										<h3>Sign up or <a id="login-link" href="/users/login?ssrc=question_page&returnurl=http%3a%2f%2fstackoverflow.com%2fquestions%2f17802445%2fhow-to-convert-a-jsoup-document-to-a-w3c-document%23new-answer">log in</a></h3>
										<script>
											StackExchange.ready(function () {
												StackExchange.helpers.onClickDraftSave('#login-link');
											});
										</script>
										<div class="preferred-login google-login">
											<p><span class="icon"></span><span>Sign up using Google</span></p>
										</div>
										<div class="preferred-login facebook-login">
											<p><span class="icon"></span><span>Sign up using Facebook</span></p>
										</div>
										<div class="preferred-login stackexchange-login">
											<p><span class="icon"></span><span>Sign up using Email and Password</span></p>
										</div>
									</div>
									<input type="hidden" name="manual-openid" class="manual-openid" />
									<input type="hidden" name="use-facebook" class="use-facebook" value="false" />
									<input type="hidden" name="use-google" class="use-google" value="false" />
									<input type="button" class="submit-openid" value="Submit" style="display:none" />
									<div class="new-login-right">
										<h3>Post as a guest</h3>
										<div class="form-item">
											<table>
												<tr>
													<td class="vm">
														<div>
															<label for="display-name">Name</label>
															<input id="display-name" name="display-name" type="text" size="30" maxlength="30" value="" tabindex="105">
														</div>
														<div>
															<label for="m-address">Email</label>
															<input id="m-address" name="m-address" type="email" size="30" maxlength="100" value="" tabindex="106" placeholder="required, but never shown" />
														</div>
													</td>
												</tr>
											</table>
										</div>

									</div>
								</div>
							</div>
							<script>
								StackExchange.ready(
										function () {
											StackExchange.openid.initPostLogin('.new-post-login', 'http%3a%2f%2fstackoverflow.com%2fquestions%2f17802445%2fhow-to-convert-a-jsoup-document-to-a-w3c-document%23new-answer', 'question_page');
										}
								);
							</script>
							<noscript>
								<h3>Post as a guest</h3>
								<div class="form-item">
									<table>
										<tr>
											<td class="vm">
												<div>
													<label for="display-name">Name</label>
													<input id="display-name" name="display-name" type="text" size="30" maxlength="30" value="" tabindex="105">
												</div>
												<div>
													<label for="m-address">Email</label>
													<input id="m-address" name="m-address" type="email" size="30" maxlength="100" value="" tabindex="106" placeholder="required, but never shown" />
												</div>
											</td>
										</tr>
									</table>
								</div>

							</noscript>

						</div>

						<div class="form-submit cbt">
							<input id="submit-button" type="submit" value="Post Your Answer" tabindex="110">
							<a href="#" class="btn-clear discard-answer dno">discard</a>

							<p class="privacy-policy-agreement">
								By posting your answer, you agree to the <a href='http://stackexchange.com/legal/privacy-policy' name='privacy' target='_blank'>privacy policy</a> and <a href='http://stackexchange.com/legal/terms-of-service' name='tos' target='_blank'>terms of service</a>.</p>
							<input type="hidden" name="legalLinksShown" value="1" />								</div>
					</form>



					<h2 class="bottom-notice" data-loc="1">
						Not the answer you&#39;re looking for?							Browse other questions tagged <a href="/questions/tagged/html-parsing" class="post-tag" title="show questions tagged &#39;html-parsing&#39;" rel="tag">html-parsing</a> <a href="/questions/tagged/jsoup" class="post-tag" title="show questions tagged &#39;jsoup&#39;" rel="tag">jsoup</a> <a href="/questions/tagged/apache-stanbol" class="post-tag" title="show questions tagged &#39;apache-stanbol&#39;" rel="tag">apache-stanbol</a>  or <a href="/questions/ask">ask your own question</a>.						</h2>
				</div>
			</div>
			<div id="sidebar" class="show-votes" role="complementary" aria-label="sidebar">
				<div class="module question-stats">
					<table id="qinfo">
						<tr>
							<td>
								<p class="label-key">asked</p>
							</td>
							<td style="padding-left: 10px">
								<p class="label-key" title="2013-07-23 05:57:38Z"><b>3 years ago</b></p>
							</td>
						</tr>
						<tr>
							<td>
								<p class="label-key">viewed</p>
							</td>

							<td style="padding-left: 10px">
								<p class="label-key">
									<b>3765 times</b>
								</p>
							</td>
						</tr>
						<tr>
							<td>
								<p class="label-key">active</p>
							</td>
							<td style="padding-left: 10px">
								<p class="label-key"><b><a href="?lastactivity" class="lastactivity-link" title="2017-02-15 22:07:23Z">1 month ago</a></b></p>
							</td>
						</tr>
					</table>
				</div>
				<div class="module community-bulletin" data-tracker="cb=1">
					<div class="related">
						<div class="bulletin-title">
							Blog
						</div>
						<hr />
						<div class="spacer">
							<div class="bulletin-item-type">
								<a href="https://stackoverflow.blog/2017/03/28/realistic-developer-fiction/" class="question-hyperlink">
									<div class="favicon favicon-stackexchangemeta" title="Meta Stack Exchange"></div>                </a>
							</div>
							<div class="bulletin-item-content">
								<a href="https://stackoverflow.blog/2017/03/28/realistic-developer-fiction/" class="question-hyperlink">And the Most Realistic Developer in Fiction is…</a>
							</div>
							<br class="cbt" />
						</div>
					</div>
				</div>
				<script>
					var ados = ados || {}; ados.run = ados.run || [];
					ados.run.push(function () { ados_add_placement(22,8277,"adzerk1428081322",[5,17,2221]).setZone(45); });
				</script>
				<div class="everyonelovesstackoverflow" id="adzerk1428081322"></div>
				<div id="hireme"></div>
				<script>
					window.clc_request = 'Alv8Gkvqd9QIAAAAAM2kDwECAAAAAgAAAAA1AAAAfGh0bWwtcGFyc2luZ3xqc291cHxhcGFjaGUtc3RhbmJvbHx4LXBlcnNvbmEtYmlnZGF0YXwAEC_F4d2BvYRIRA';
					(function (n) {
						var t, u, r, i;
						try {
							if (typeof[].indexOf != "function")return;
							if (window.attachEvent && !window.addEventListener)return;
							if (n.allowed[0] !== "*" && n.allowed.indexOf(location.hostname) === -1)return;
							if (t = window, t.clc = t.clc || {}, u = t.clc_request || t.clcfl_request, t.clc.init = t.clc.init || [], t.clc.init.push(function (n) {
										return n.load()
									}), t.clc.options) {
								for (r in t.clc.options)n[r] = t.clc.options[r];
								t.clc.options = n
							} else t.clc.options = n;
							i = document.createElement("script");
							i.async = !0;
							i.src = n.lib;
							document.body.appendChild(i)
						} catch (f) {
							console.error("[clc] Error in loader:", f)
						}
					}).call(null, {
						"azw": true,
						"kt": 2000,
						"tto": true,
						"autoload": true,
						"d": {
							"sb": ["hireme", "clc-sb"],
							"tlb": ["careers1", "clc-tlb"],
							"mlb": ["careers3", "clc-mlb"]
						},
						"allowed": ["stackoverflow.com", "serverfault.com", "blog.codinghorror.com", "talent.stackoverflow.com"],
						"h": "clc.stackoverflow.com",
						"u": "https://clc.stackoverflow.com/markup.js",
						"lib": "https://cdn.sstatic.net/clc/clc.min.js?v=1054aad5373d"
					});        </script>


				<div class="module sidebar-linked">
					<h4 id="h-linked">Linked</h4>
					<div class="linked" data-tracker="lq=1">

						<div class="spacer">
							<a href="/q/20801076" title="Vote score (upvotes - downvotes)">
								<div class="answer-votes answered-accepted default">0</div>
							</a>
							<a href="/questions/20801076/error-java-lang-classcastexception-org-jsoup-nodes-document-cannot-be-cast-to?noredirect=1" class="question-hyperlink">Error : java.lang.ClassCastException: org.jsoup.nodes.Document cannot be cast to org.w3c.dom.Node</a>
						</div>
						<div class="spacer">
							<a href="/q/29468319" title="Vote score (upvotes - downvotes)">
								<div class="answer-votes  default">4</div>
							</a>
							<a href="/questions/29468319/how-to-select-sibling-text-node-in-jsoup?noredirect=1" class="question-hyperlink">How to select sibling text node in Jsoup?</a>
						</div>			</div>
				</div>

				<div class="module sidebar-related">
					<h4 id="h-related">Related</h4>
					<div class="related js-gps-related-questions" data-tracker="rq=1">
						<div class="spacer"><a href="/q/3577641" title="Vote score (upvotes - downvotes)"><div class="answer-votes answered-accepted extra-large">1588</div></a><a href="/questions/3577641/how-do-you-parse-and-process-html-xml-in-php" class="question-hyperlink">How do you parse and process HTML/XML in PHP?</a></div><div class="spacer"><a href="/q/6865090" title="Vote score (upvotes - downvotes)"><div class="answer-votes answered-accepted default">13</div></a><a href="/questions/6865090/how-do-i-convert-a-document-made-in-jsoup-the-java-html-parser-into-a-string" class="question-hyperlink">How do I convert a document made in Jsoup (the Java html parser) into a string</a></div><div class="spacer"><a href="/q/7122415" title="Vote score (upvotes - downvotes)"><div class="answer-votes answered-accepted default">4</div></a><a href="/questions/7122415/how-do-i-parse-an-html-document-with-jsoup-to-get-a-list-of-links" class="question-hyperlink">How do I parse an HTML document with JSoup to get a list of links?</a></div><div class="spacer"><a href="/q/10203518" title="Vote score (upvotes - downvotes)"><div class="answer-votes answered-accepted default">0</div></a><a href="/questions/10203518/how-can-i-remove-all-non-markup-in-html-document-with-jsoup" class="question-hyperlink">how can I remove all non-markup in html document with jsoup?</a></div><div class="spacer"><a href="/q/14672114" title="Vote score (upvotes - downvotes)"><div class="answer-votes default">1</div></a><a href="/questions/14672114/jsoup-document-structure-issue-html" class="question-hyperlink">JSOUP Document Structure issue HTML</a></div><div class="spacer"><a href="/q/25675310" title="Vote score (upvotes - downvotes)"><div class="answer-votes default">0</div></a><a href="/questions/25675310/jsoup-posting-login-data" class="question-hyperlink">JSoup posting login data</a></div><div class="spacer"><a href="/q/30037547" title="Vote score (upvotes - downvotes)"><div class="answer-votes answered-accepted default">1</div></a><a href="/questions/30037547/how-to-parse-html-by-part-of-a-class-name-with-jsoup" class="question-hyperlink">How to parse html by part of a class name with JSOUP?</a></div><div class="spacer"><a href="/q/36504228" title="Vote score (upvotes - downvotes)"><div class="answer-votes default">2</div></a><a href="/questions/36504228/jsoup-to-w3c-document-invalid-character-err" class="question-hyperlink">jsoup to w3c-document: INVALID_CHARACTER_ERR</a></div><div class="spacer"><a href="/q/36528466" title="Vote score (upvotes - downvotes)"><div class="answer-votes default">1</div></a><a href="/questions/36528466/is-there-any-convenient-way-to-convert-w3c-document-to-jsoup-one" class="question-hyperlink">Is there any convenient way to convert w3c Document to jsoup one</a></div><div class="spacer"><a href="/q/40171709" title="Vote score (upvotes - downvotes)"><div class="answer-votes default">0</div></a><a href="/questions/40171709/jsoup-parse-html-page-without-change-the-content" class="question-hyperlink">Jsoup parse html page without change the content</a></div>
					</div>
				</div>

				<div id="hot-network-questions" class="module tex2jax_ignore">
					<h4>
						<a href="https://stackexchange.com/questions?tab=hot"
						   class="js-gps-track"
						   data-gps-track="posts_hot_network.click({ item_type:1, location:11 })">
							Hot Network Questions
						</a>
					</h4>
					<ul>
						<li >
							<div class="favicon favicon-unix" title="Unix &amp; Linux Stack Exchange"></div><a href="http://unix.stackexchange.com/questions/354928/bash-sudo-command-not-found" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:106 }); posts_hot_network.click({ item_type:2, location:11 })">
							-bash: sudo: command not found
						</a>

						</li>
						<li >
							<div class="favicon favicon-stackoverflow" title="Stack Overflow"></div><a href="http://stackoverflow.com/questions/43108558/inconsistency-between-and-in-regex-when-using-start-end-arguments-to-re-sear" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:1 }); posts_hot_network.click({ item_type:2, location:11 })">
							Inconsistency between $ and ^ in regex when using start/end arguments to re.search?
						</a>

						</li>
						<li >
							<div class="favicon favicon-travel" title="Travel Stack Exchange"></div><a href="http://travel.stackexchange.com/questions/90636/caught-speeding-111-mph-179-km-h-in-california-how-can-i-settle-the-case-with" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:273 }); posts_hot_network.click({ item_type:2, location:11 })">
							Caught speeding 111 Mph (179 km/h) in California. How can I settle the case with the court?
						</a>

						</li>
						<li >
							<div class="favicon favicon-worldbuilding" title="Worldbuilding Stack Exchange"></div><a href="http://worldbuilding.stackexchange.com/questions/75797/human-echolocation-for-spies-what-sound-to-use" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:579 }); posts_hot_network.click({ item_type:2, location:11 })">
							Human echolocation for spies. What sound to use?
						</a>

						</li>
						<li >
							<div class="favicon favicon-puzzling" title="Puzzling Stack Exchange"></div><a href="http://puzzling.stackexchange.com/questions/50536/thanks-for-all-your-help" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:559 }); posts_hot_network.click({ item_type:2, location:11 })">
							Thanks for all your help
						</a>

						</li>
						<li class="dno js-hidden">
							<div class="favicon favicon-politics" title="Politics Stack Exchange"></div><a href="http://politics.stackexchange.com/questions/16708/is-trumps-us-travel-more-expensive-than-previous-presidents" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:475 }); posts_hot_network.click({ item_type:2, location:11 })">
							Is Trump&#39;s US travel more expensive than previous presidents?
						</a>

						</li>
						<li class="dno js-hidden">
							<div class="favicon favicon-graphicdesign" title="Graphic Design Stack Exchange"></div><a href="http://graphicdesign.stackexchange.com/questions/87572/what-is-the-standard-way-for-conveying-vegan-and-vegetarian-as-separate-icons" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:174 }); posts_hot_network.click({ item_type:2, location:11 })">
							What is the standard way for conveying vegan and vegetarian as separate icons?
						</a>

						</li>
						<li class="dno js-hidden">
							<div class="favicon favicon-english" title="English Language &amp; Usage Stack Exchange"></div><a href="http://english.stackexchange.com/questions/380582/is-there-an-english-equivalent-of-the-italian-idiom-non-confondiamo-loro-con-l" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:97 }); posts_hot_network.click({ item_type:2, location:11 })">
							Is there an English equivalent of the Italian idiom &quot;non confondiamo l&#39;oro con la tolla!&quot;?
						</a>

						</li>
						<li class="dno js-hidden">
							<div class="favicon favicon-blender" title="Blender Stack Exchange"></div><a href="http://blender.stackexchange.com/questions/76756/how-to-animate-winding-a-ribbon-onto-a-cylinder" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:502 }); posts_hot_network.click({ item_type:2, location:11 })">
							How to animate winding a ribbon onto a cylinder?
						</a>

						</li>
						<li class="dno js-hidden">
							<div class="favicon favicon-mathoverflow" title="MathOverflow"></div><a href="http://mathoverflow.net/questions/265958/consequences-of-the-birch-and-swinnerton-dyer-conjecture" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:504 }); posts_hot_network.click({ item_type:2, location:11 })">
							Consequences of the Birch and Swinnerton-Dyer Conjecture?
						</a>

						</li>
						<li class="dno js-hidden">
							<div class="favicon favicon-history" title="History Stack Exchange"></div><a href="http://history.stackexchange.com/questions/36248/why-did-north-america-economically-prosper-and-maintain-stable-government-and-s" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:324 }); posts_hot_network.click({ item_type:2, location:11 })">
							Why did North America economically prosper, and maintain stable government and South/Central America didn&#39;t?
						</a>

						</li>
						<li class="dno js-hidden">
							<div class="favicon favicon-academia" title="Academia Stack Exchange"></div><a href="http://academia.stackexchange.com/questions/87129/i-realize-i-made-a-huge-mistake-in-my-thesis-and-am-not-sure-what-to-do-im-def" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:415 }); posts_hot_network.click({ item_type:2, location:11 })">
							I realize I made a huge mistake in my thesis and am not sure what to do. I&#39;m defending very soon (days away). What should I do?
						</a>

						</li>
						<li class="dno js-hidden">
							<div class="favicon favicon-scifi" title="Science Fiction &amp; Fantasy Stack Exchange"></div><a href="http://scifi.stackexchange.com/questions/155981/did-luke-really-not-know-about-mos-eisley-spaceport-in-the-original-star-wars" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:186 }); posts_hot_network.click({ item_type:2, location:11 })">
							Did Luke really not know about Mos Eisley spaceport in the original “Star Wars” (1977) film?
						</a>

						</li>
						<li class="dno js-hidden">
							<div class="favicon favicon-superuser" title="Super User"></div><a href="https://superuser.com/questions/1193102/why-does-dir-give-me-all-files-and-folders" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:3 }); posts_hot_network.click({ item_type:2, location:11 })">
							Why does `dir *.*` give me all files and folders?
						</a>

						</li>
						<li class="dno js-hidden">
							<div class="favicon favicon-diy" title="Home Improvement Stack Exchange"></div><a href="http://diy.stackexchange.com/questions/111204/do-you-strip-the-outer-sheath-on-romex-when-it-enters-a-load-center-breaker-bo" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:73 }); posts_hot_network.click({ item_type:2, location:11 })">
							Do you strip the outer sheath on romex when it enters a load center / breaker box?
						</a>

						</li>
						<li class="dno js-hidden">
							<div class="favicon favicon-codegolf" title="Programming Puzzles &amp; Code Golf Stack Exchange"></div><a href="http://codegolf.stackexchange.com/questions/114060/output-the-missing-integer" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:200 }); posts_hot_network.click({ item_type:2, location:11 })">
							Output the missing integer
						</a>

						</li>
						<li class="dno js-hidden">
							<div class="favicon favicon-workplace" title="The Workplace Stack Exchange"></div><a href="http://workplace.stackexchange.com/questions/88138/working-on-live-dev-code-in-the-interview-process-ethical" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:423 }); posts_hot_network.click({ item_type:2, location:11 })">
							Working on live dev code in the interview process: ethical?
						</a>

						</li>
						<li class="dno js-hidden">
							<div class="favicon favicon-worldbuilding" title="Worldbuilding Stack Exchange"></div><a href="http://worldbuilding.stackexchange.com/questions/75656/would-an-endothermic-star-be-possible" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:579 }); posts_hot_network.click({ item_type:2, location:11 })">
							Would an endothermic star be possible?
						</a>

						</li>
						<li class="dno js-hidden">
							<div class="favicon favicon-ux" title="User Experience Stack Exchange"></div><a href="http://ux.stackexchange.com/questions/106369/when-do-users-understand-that-a-wizard-navigation-bar-is-clickable" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:102 }); posts_hot_network.click({ item_type:2, location:11 })">
							When do users understand that a wizard navigation bar is clickable?
						</a>

						</li>
						<li class="dno js-hidden">
							<div class="favicon favicon-codegolf" title="Programming Puzzles &amp; Code Golf Stack Exchange"></div><a href="http://codegolf.stackexchange.com/questions/114487/find-the-binarray" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:200 }); posts_hot_network.click({ item_type:2, location:11 })">
							Find the binarray!
						</a>

						</li>
						<li class="dno js-hidden">
							<div class="favicon favicon-math" title="Mathematics Stack Exchange"></div><a href="http://math.stackexchange.com/questions/2209592/can-an-idempotent-matrix-be-complex" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:69 }); posts_hot_network.click({ item_type:2, location:11 })">
							Can an idempotent matrix be complex?
						</a>

						</li>
						<li class="dno js-hidden">
							<div class="favicon favicon-academia" title="Academia Stack Exchange"></div><a href="http://academia.stackexchange.com/questions/87241/is-it-okay-to-refuse-a-laptop-from-a-new-university-if-you-already-have-your-own" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:415 }); posts_hot_network.click({ item_type:2, location:11 })">
							Is it okay to refuse a laptop from a new university if you already have your own personal laptop?
						</a>

						</li>
						<li class="dno js-hidden">
							<div class="favicon favicon-politics" title="Politics Stack Exchange"></div><a href="http://politics.stackexchange.com/questions/16606/why-couldnt-republicans-who-voted-to-repeal-obamacare-so-many-times-under-obama" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:475 }); posts_hot_network.click({ item_type:2, location:11 })">
							Why couldn&#39;t Republicans who voted to repeal Obamacare so many times under Obama do it under a Republican president?
						</a>

						</li>
						<li class="dno js-hidden">
							<div class="favicon favicon-scifi" title="Science Fiction &amp; Fantasy Stack Exchange"></div><a href="http://scifi.stackexchange.com/questions/156004/what-magic-forced-uncle-vernon-to-suddenly-let-go-of-harry-as-though-shocked" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:186 }); posts_hot_network.click({ item_type:2, location:11 })">
							What magic forced Uncle Vernon to suddenly let go of Harry as though shocked?
						</a>

						</li>
					</ul>

					<a href="#"
					   class="show-more js-show-more js-gps-track"
					   data-gps-track="posts_hot_network.click({ item_type:3, location:11 })">
						more hot questions
					</a>
				</div>
			</div>

			<div id="feed-link">
				<div id="feed-link-text">
					<a href="/feeds/question/17802445" title="feed of this question and its answers">
						<span class="feed-icon"></span>question feed
					</a>
				</div>
			</div>	<script>
			StackExchange.ready(function(){$.get('/posts/17802445/ivc/923f');});
		</script>
			<noscript>
				<div><img src="/posts/17802445/ivc/923f" class="dno" alt="" width="0" height="0"></div>
			</noscript><div style="display:none" id="prettify-lang">lang-java</div></div>


	</div>
</div>
<div id="footer" class="categories" role="contentinfo">
	<div class="footerwrap">
		<div id="footer-menu">
			<div class="top-footer-links">
				<a href="http://stackoverflow.com/company/about">about us</a>
				<a href="/tour">tour</a>
				<a href="/help">help</a>
				<a href="https://stackoverflow.blog?blb=1">blog</a>
				<a href="http://chat.stackoverflow.com">chat</a>
				<a href="https://data.stackexchange.com">data</a>
				<a href="https://stackexchange.com/legal">legal</a>
				<a href="https://stackexchange.com/legal/privacy-policy">privacy policy</a>
				<a href="http://stackoverflow.com/company/work-here">work here</a>
				<a href="https://www.stackoverflowbusiness.com/advertise">advertising info</a>
				<a href="http://stackoverflow.com/jobs/directory/developer-jobs">developer jobs directory</a>

				<a onclick='StackExchange.switchMobile("on")'>mobile</a>
				<b><a href="/contact">contact us</a></b>
				<b><a href="https://meta.stackoverflow.com">feedback</a></b>

			</div>
			<div id="footer-sites">
				<table>
					<tr>
						<th colspan=3>
							Technology
						</th>
						<th >
							Life / Arts
						</th>
						<th >
							Culture / Recreation
						</th>
						<th >
							Science
						</th>
						<th >
							Other
						</th>
					</tr>
					<tr>
						<td>
							<ol>
								<li><a href="//stackoverflow.com" title="professional and enthusiast programmers">Stack Overflow</a></li>
								<li><a href="//serverfault.com" title="system and network administrators">Server Fault</a></li>
								<li><a href="//superuser.com" title="computer enthusiasts and power users">Super User</a></li>
								<li><a href="//webapps.stackexchange.com" title="power users of web applications">Web Applications</a></li>
								<li><a href="//askubuntu.com" title="Ubuntu users and developers">Ask Ubuntu</a></li>
								<li><a href="//webmasters.stackexchange.com" title="pro webmasters">Webmasters</a></li>
								<li><a href="//gamedev.stackexchange.com" title="professional and independent game developers">Game Development</a></li>
								<li><a href="//tex.stackexchange.com" title="users of TeX, LaTeX, ConTeXt, and related typesetting systems">TeX - LaTeX</a></li>
								<li><a href="//softwareengineering.stackexchange.com" title="professionals, academics, and students working within the systems development life cycle who care about creating, delivering, and maintaining software responsibly">Software Engineering</a></li>
								<li><a href="//unix.stackexchange.com" title="users of Linux, FreeBSD and other Un*x-like operating systems">Unix &amp; Linux</a></li>
								<li><a href="//apple.stackexchange.com" title="power users of Apple hardware and software">Ask Different (Apple)</a></li>
								<li><a href="//wordpress.stackexchange.com" title="WordPress developers and administrators">WordPress Development</a></li>
							</ol></td><td><ol>
						<li><a href="//gis.stackexchange.com" title="cartographers, geographers and GIS professionals">Geographic Information Systems</a></li>
						<li><a href="//electronics.stackexchange.com" title="electronics and electrical engineering professionals, students, and enthusiasts">Electrical Engineering</a></li>
						<li><a href="//android.stackexchange.com" title="enthusiasts and power users of the Android operating system">Android Enthusiasts</a></li>
						<li><a href="//security.stackexchange.com" title="information security professionals">Information Security</a></li>
						<li><a href="//dba.stackexchange.com" title="database professionals who wish to improve their database skills and learn from others in the community">Database Administrators</a></li>
						<li><a href="//drupal.stackexchange.com" title="Drupal developers and administrators">Drupal Answers</a></li>
						<li><a href="//sharepoint.stackexchange.com" title="SharePoint enthusiasts">SharePoint</a></li>
						<li><a href="//ux.stackexchange.com" title="user experience researchers and experts">User Experience</a></li>
						<li><a href="//mathematica.stackexchange.com" title="users of Wolfram Mathematica">Mathematica</a></li>
						<li><a href="//salesforce.stackexchange.com" title="Salesforce administrators, implementation experts, developers and anybody in-between">Salesforce</a></li>
						<li><a href="//expressionengine.stackexchange.com" title="administrators, end users, developers and designers for ExpressionEngine&#174; CMS">ExpressionEngine&#174; Answers</a></li>
						<li><a href="//crypto.stackexchange.com" title="software developers, mathematicians and others interested in cryptography">Cryptography</a></li>
					</ol></td><td><ol>
						<li><a href="//codereview.stackexchange.com" title="peer programmer code reviews">Code Review</a></li>
						<li><a href="//magento.stackexchange.com" title="users of the Magento e-Commerce platform">Magento</a></li>
						<li><a href="//dsp.stackexchange.com" title="practitioners of the art and science of signal, image and video processing">Signal Processing</a></li>
						<li><a href="//raspberrypi.stackexchange.com" title="users and developers of hardware and software for Raspberry Pi">Raspberry Pi</a></li>
						<li><a href="//codegolf.stackexchange.com" title="programming puzzle enthusiasts and code golfers">Programming Puzzles &amp; Code Golf</a></li>

						<li>
							<a href="http://stackexchange.com/sites#technology" class="more">
								more (7)
							</a>
						</li>
					</ol>
					</td>
						<td>
							<ol>
								<li><a href="//photo.stackexchange.com" title="professional, enthusiast and amateur photographers">Photography</a></li>
								<li><a href="//scifi.stackexchange.com" title="science fiction and fantasy enthusiasts">Science Fiction &amp; Fantasy</a></li>
								<li><a href="//graphicdesign.stackexchange.com" title="Graphic Design professionals, students, and enthusiasts">Graphic Design</a></li>
								<li><a href="//movies.stackexchange.com" title="movie and tv enthusiasts">Movies &amp; TV</a></li>
								<li><a href="//music.stackexchange.com" title="musicians, students, and enthusiasts">Music: Practice &amp; Theory</a></li>
								<li><a href="//cooking.stackexchange.com" title="professional and amateur chefs">Seasoned Advice (cooking)</a></li>
								<li><a href="//diy.stackexchange.com" title="contractors and serious DIYers">Home Improvement</a></li>
								<li><a href="//money.stackexchange.com" title="people who want to be financially literate">Personal Finance &amp; Money</a></li>
								<li><a href="//academia.stackexchange.com" title="academics and those enrolled in higher education">Academia</a></li>

								<li>
									<a href="http://stackexchange.com/sites#lifearts" class="more">
										more (8)
									</a>
								</li>
							</ol>
						</td>
						<td>
							<ol>
								<li><a href="//english.stackexchange.com" title="linguists, etymologists, and serious English language enthusiasts">English Language &amp; Usage</a></li>
								<li><a href="//skeptics.stackexchange.com" title="scientific skepticism">Skeptics</a></li>
								<li><a href="//judaism.stackexchange.com" title="those who base their lives on Jewish law and tradition and anyone interested in learning more">Mi Yodeya (Judaism)</a></li>
								<li><a href="//travel.stackexchange.com" title="road warriors and seasoned travelers">Travel</a></li>
								<li><a href="//christianity.stackexchange.com" title="committed Christians, experts in Christianity and those interested in learning more">Christianity</a></li>
								<li><a href="//ell.stackexchange.com" title="speakers of other languages learning English">English Language Learners</a></li>
								<li><a href="//japanese.stackexchange.com" title="students, teachers, and linguists wanting to discuss the finer points of the Japanese language">Japanese Language</a></li>
								<li><a href="//gaming.stackexchange.com" title="passionate videogamers on all platforms">Arqade (gaming)</a></li>
								<li><a href="//bicycles.stackexchange.com" title="people who build and repair bicycles, people who train cycling, or commute on bicycles">Bicycles</a></li>
								<li><a href="//rpg.stackexchange.com" title="gamemasters and players of tabletop, paper-and-pencil role-playing games">Role-playing Games</a></li>
								<li><a href="//anime.stackexchange.com" title="anime and manga fans">Anime &amp; Manga</a></li>
								<li><a href="//mechanics.stackexchange.com" title="mechanics and DIY enthusiast owners of cars, trucks, and motorcycles">Motor Vehicle Maintenance &amp; Repair</a></li>

								<li>
									<a href="http://stackexchange.com/sites#culturerecreation" class="more">
										more (17)
									</a>
								</li>
							</ol>
						</td>
						<td>
							<ol>
								<li><a href="//mathoverflow.net" title="professional mathematicians">MathOverflow</a></li>
								<li><a href="//math.stackexchange.com" title="people studying math at any level and professionals in related fields">Mathematics</a></li>
								<li><a href="//stats.stackexchange.com" title="people interested in statistics, machine learning, data analysis, data mining, and data visualization">Cross Validated (stats)</a></li>
								<li><a href="//cstheory.stackexchange.com" title="theoretical computer scientists and researchers in related fields">Theoretical Computer Science</a></li>
								<li><a href="//physics.stackexchange.com" title="active researchers, academics and students of physics">Physics</a></li>
								<li><a href="//chemistry.stackexchange.com" title="scientists, academics, teachers and students">Chemistry</a></li>
								<li><a href="//biology.stackexchange.com" title="biology researchers, academics, and students">Biology</a></li>
								<li><a href="//cs.stackexchange.com" title="students, researchers and practitioners of computer science">Computer Science</a></li>
								<li><a href="//philosophy.stackexchange.com" title="those interested in the study of the fundamental nature of knowledge, reality, and existence">Philosophy</a></li>

								<li>
									<a href="http://stackexchange.com/sites#science" class="more">
										more (3)
									</a>
								</li>
							</ol>
						</td>
						<td>
							<ol>
								<li><a href="//meta.stackexchange.com" title="meta-discussion of the Stack Exchange family of Q&amp;A websites">Meta Stack Exchange</a></li>
								<li><a href="//stackapps.com" title="apps, scripts, and development with the Stack Exchange API">Stack Apps</a></li>
								<li><a href="//area51.stackexchange.com" title="proposing new sites in the Stack Exchange network">Area 51</a></li>
								<li><a href="https://www.stackoverflowbusiness.com/talent">Stack Overflow Talent</a></li>

							</ol>
						</td>
					</tr>
				</table>
			</div>
		</div>
		<div id="copyright">
			site design / logo &#169; 2017 Stack Exchange Inc; user contributions licensed under <a href="https://creativecommons.org/licenses/by-sa/3.0/" rel="license">cc by-sa 3.0</a>
			with <a href="http://blog.stackoverflow.com/2009/06/attribution-required/" rel="license">attribution required</a>
		</div>
		<div id="svnrev">
			rev 2017.3.31.25579
		</div>
	</div>
</div>
<noscript>
	<div id="noscript-warning">Stack Overflow works best with JavaScript enabled<img src="https://pixel.quantserve.com/pixel/p-c1rF4kxgLUzNc.gif" alt="" class="dno"></div>
</noscript>

<script>var p = "http", d = "static"; if (document.location.protocol == "https:") { p += "s"; d = "engine"; } var z = document.createElement("script"); z.type = "text/javascript"; z.async = true; z.src = p + "://" + d + ".adzerk.net/ados.js"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(z, s);</script>
<script>
	var ados = ados || {};
	ados.run = ados.run || [];



	ados.run.push(function () {
		setTimeout(function () { $("#adzerk-user-match").remove(); }, window.AUMIframeDone ? 0 : 2000);
		ados_setKeywords('html-parsing,jsoup,apache-stanbol,x-persona-bigdata');
		ados_load();
	});

</script>

<script>
	(function(i, s, o, g, r, a, m) {
		i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function() { (i[r].q = i[r].q || []).push(arguments) }, i[r].l = 1 * new Date(); a = s.createElement(o),
				m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m);
	})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
	ga('create', 'UA-5620270-1');
	ga('create', 'UA-5620270-59', {name: 'pageData', sampleRate: 5 });
	ga('set', 'dimension2', '|html-parsing|jsoup|apache-stanbol|');
	ga('pageData.set', 'dimension2', '|html-parsing|jsoup|apache-stanbol|');
	ga('send', 'pageview');
	ga('pageData.send', 'pageview');
	var _qevents = _qevents || [],
			_comscore = _comscore || [];
	(function () {
		var ssl='https:'==document.location.protocol,
				s=document.getElementsByTagName('script')[0],
				qc=document.createElement('script');
		qc.async = true;
		qc.src = (ssl ? 'https://secure' : 'http://edge') + '.quantserve.com/quant.js';
		s.parentNode.insertBefore(qc, s);
		_qevents.push({ qacct: "p-c1rF4kxgLUzNc" });
		var sc=document.createElement('script');
		sc.async=true;
		sc.src=(ssl?'https://sb':'http://b') + '.scorecardresearch.com/beacon.js';
		s.parentNode.insertBefore(sc, s);
		_comscore.push({ c1: "2", c2: "17440561" });
	})();

</script>


<script type="text/javascript">

	(function(appendChild) {
		Node.prototype.appendChild = function() {
			var parent = this;
			var newNode = arguments[0];
			if (parent.nodeName === 'HEAD'
					&& newNode
					&& newNode.nodeName === 'SCRIPT'
					&& newNode.src) {

				window.setTimeout(function() {
					var result = newNode.src.match(/^https:\/\/maps\.googleapis\.com\/maps\/api\/place\/js\/(\w+)Service\./i) || [];
					var service = result[1];
					if (service) {
						if (service === 'Autocompletion') service =  2;
						else if (service === 'Place') service = 1;
						else service = 0;
						StackExchange.using('gps', function() {
							StackExchange.gps.track('google_maps_places_api.call', { service: service });
						});
					}
				}, 0);
			}
			return appendChild.apply(this, arguments);
		};
	})(Node.prototype.appendChild);
</script>
</body>
</html>
